
hook.o:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <null_func>:
#include <sys/personality.h>

void (*aaa)();

void null_func()
{
   0:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
   4:	910003fd 	mov	x29, sp
	printf("THIS is NULL!!!\n");
   8:	90000000 	adrp	x0, 0 <null_func>
   c:	91000000 	add	x0, x0, #0x0
  10:	94000000 	bl	0 <puts>
}
  14:	d503201f 	nop
  18:	a8c17bfd 	ldp	x29, x30, [sp], #16
  1c:	d65f03c0 	ret

0000000000000020 <map_and_call_null>:

void map_and_call_null()
{
  20:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  24:	910003fd 	mov	x29, sp
	char *addr = NULL;
  28:	f9000fbf 	str	xzr, [x29, #24] ; addr

	addr = mmap(0, 0x1000, PROT_READ|PROT_WRITE|PROT_EXEC,MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE, 0, 0);
  2c:	d2800005 	mov	x5, #0x0                   	// #0
  30:	52800004 	mov	w4, #0x0                   	// #0
  34:	52800643 	mov	w3, #0x32                  	// #50
  38:	528000e2 	mov	w2, #0x7                   	// #7
  3c:	d2820001 	mov	x1, #0x1000                	// #4096
  40:	d2800000 	mov	x0, #0x0                   	// #0
  44:	94000000 	bl	0 <mmap>
  48:	f9000fa0 	str	x0, [x29, #24]
	addr[0] = '\xff';
  4c:	f9400fa0 	ldr	x0, [x29, #24]
  50:	12800001 	mov	w1, #0xffffffff            	// #-1
  54:	39000001 	strb	w1, [x0]
	addr[1] = '\x25';
  58:	f9400fa0 	ldr	x0, [x29, #24]
  5c:	91000400 	add	x0, x0, #0x1
  60:	528004a1 	mov	w1, #0x25                  	// #37
  64:	39000001 	strb	w1, [x0]
	*(unsigned int *)&addr[2] = 6;
  68:	f9400fa0 	ldr	x0, [x29, #24]
  6c:	91000800 	add	x0, x0, #0x2
  70:	528000c1 	mov	w1, #0x6                   	// #6
  74:	b9000001 	str	w1, [x0]
	*(unsigned long *)&addr[6] = (unsigned long)&null_func;
  78:	f9400fa0 	ldr	x0, [x29, #24]
  7c:	91001800 	add	x0, x0, #0x6
  80:	90000001 	adrp	x1, 0 <null_func>
  84:	91000021 	add	x1, x1, #0x0
  88:	f9000001 	str	x1, [x0]
	aaa = NULL; //...NULL
  8c:	90000000 	adrp	x0, 8 <null_func+0x8>
  90:	91000000 	add	x0, x0, #0x0
  94:	f900001f 	str	xzr, [x0]
	(*aaa)();
  98:	90000000 	adrp	x0, 8 <null_func+0x8>
  9c:	91000000 	add	x0, x0, #0x0
  a0:	f9400000 	ldr	x0, [x0]
  a4:	d63f0000 	blr	x0

	int *empty = NULL;
  a8:	f9000bbf 	str	xzr, [x29, #16]
	printf("1 %x\n",*empty);
  ac:	f9400ba0 	ldr	x0, [x29, #16]
  b0:	b9400001 	ldr	w1, [x0]
  b4:	90000000 	adrp	x0, 0 <null_func>
  b8:	91000000 	add	x0, x0, #0x0
  bc:	94000000 	bl	0 <printf>
	printf("2 %x\n",*(empty+1));
  c0:	f9400ba0 	ldr	x0, [x29, #16]
  c4:	91001000 	add	x0, x0, #0x4 ; empty + 4
  c8:	b9400001 	ldr	w1, [x0]
  cc:	90000000 	adrp	x0, 0 <null_func>
  d0:	91000000 	add	x0, x0, #0x0
  d4:	94000000 	bl	0 <printf>
	printf("3 %x\n",*(empty+2));
  d8:	f9400ba0 	ldr	x0, [x29, #16]
  dc:	91002000 	add	x0, x0, #0x8 ; empty + 8
  e0:	b9400001 	ldr	w1, [x0]
  e4:	90000000 	adrp	x0, 0 <null_func>
  e8:	91000000 	add	x0, x0, #0x0
  ec:	94000000 	bl	0 <printf>
}
  f0:	d503201f 	nop
  f4:	a8c27bfd 	ldp	x29, x30, [sp], #32
  f8:	d65f03c0 	ret

00000000000000fc <main>:

int main()
{
  fc:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
 100:	910003fd 	mov	x29, sp
	map_and_call_null();
 104:	94000000 	bl	20 <map_and_call_null>
 108:	52800000 	mov	w0, #0x0                   	// #0
}
 10c:	a8c17bfd 	ldp	x29, x30, [sp], #16
 110:	d65f03c0 	ret
